package beikai.com.assistant.controller;


import beikai.com.assistant.common.domain.params.UserPaymentParams;
import beikai.com.assistant.service.IUserPaymentService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户消费记录 前端控制器
 * </p>
 *
 * @author beikai
 * @since 2021-12-19
 */
@RestController
@RequestMapping("/user/user-payment-model")
public class UserPaymentController {
    @Autowired
    private IUserPaymentService userPaymentService;

    @PostMapping("/addPay")
    public JSONObject addPay(@RequestBody UserPaymentParams userPaymentParams){
        return userPaymentService.addPay(userPaymentParams);
    }

    @PostMapping("/getPayInfo")
    public JSONObject getPayInfo(@RequestBody UserPaymentParams userPaymentParams){
        return userPaymentService.getPayInfo(userPaymentParams);
    }

}

